<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			function Person(name){
				this.name=name;
				
			}
			Person.prototype.sayName=function(){
				return this.name;
			}
			
			function Student(name,age ,chinese,math){
				Person.call(this,name);
				this.age=age;
				this.chinese=chinese;
				this.math =math;
			}
			//继承
			Student.prototype = new Person();
			Student.prototype.getAge=function(){
				return this.sayName()+ this.age+ this.chinese+this.math;
			}
			var stu = new Student("张三",18,"语文98","数学100");
			alert(stu.getAge());
		</script>
	</body>
</html>
